﻿<div ng-controller="Monitor.SdbOverview.Node.Ctrl" ng-container="{}">
   <div style="background:#F4F4F4;" ng-container="{height:57}">
      <div class="nav-new">
         <div class="active" ng-click="GotoNodes()">{{autoLanguage("节点")}}</div>
         <div ng-click="GotoResources()">{{autoLanguage("资源")}}</div>
         <div ng-click="GotoHostList()">{{autoLanguage("主机")}}</div>
         <!--<div>{{autoLanguage("安全")}}</div>-->
      </div>
   </div>
   <div style="padding:8px 15px 10px 15px;" ng-container="{offsetY:-60}">
      <div class="underlineTab" style="padding-top:10px;border-top:2px solid #F0F0F0;" ng-container="{height:50,marginTop:10}">
         <ul class="left">
            <li class="active">
               <a href="#Monitor/SDB-Nodes/Nodes">{{autoLanguage("节点列表")}}</a>
            </li>
            <li>
               <a href="#/Monitor/SDB-Nodes/Groups">{{autoLanguage("分区组列表")}}</a>
            </li>
            <li>
               <a href="#/Monitor/SDB-Nodes/Charts">{{autoLanguage("图表")}}</a>
            </li>
            <li>
               <a href="#/Monitor/SDB-Nodes/GroupsSnapshot">{{autoLanguage("分区组快照")}}</a>
            </li>
            <li>
               <a href="#/Monitor/SDB-Nodes/NodesSnapshot">{{autoLanguage("节点快照")}}</a>
            </li>
            <li>
               <a href="#/Monitor/SDB-Nodes/NodesSync">{{autoLanguage("节点数据同步")}}</a>
            </li>
         </ul>
      </div>

      <div style="height:30px;margin:10px 0;">
         <button class="topBtn" ng-class="{true:'disabled'}[StartNode['config']['select'].length == 0]" ng-click="OpenStartNodeWindow()">{{autoLanguage("启动节点")}}</button>&nbsp;
         <button class="topBtn" ng-class="{true:'disabled'}[StopNode['config']['select'].length == 0]" ng-click="OpenStopNodeWindow()">{{autoLanguage("停止节点")}}</button>&nbsp;
         <button class="topBtn" ng-click="GotoSync()">{{autoLanguage("同步业务")}}</button>&nbsp;
      </div>

      <div ng-windows="info as StartNode.config" windows-callback="StartNode.callback">
         <select class="form-control" ng-model="info.value" ng-options="item.value as item.key for item in info.select"></select>
      </div>

      <div ng-windows="info as StopNode.config" windows-callback="StopNode.callback">
         <select class="form-control" ng-model="info.value" ng-options="item.value as item.key for item in info.select"></select>
      </div>

      <div ng-container="{offsetY:-112}" ng-table="NodeTable['options']" table-title="NodeTable['title']" table-content="nodeInfo in NodeTable['body']">
         <div class="Ellipsis" table-key="Status">
            <i class="fa fa-circle" ng-style="{true:{'color':'#00CC66'},false:{'color':'#D9534F'}}[nodeInfo['Status']]"></i>&nbsp;
            <span ng-if="nodeInfo['Status'] == true">{{autoLanguage('正常')}}</span>
            <span ng-if="nodeInfo['Status'] == false">{{sprintf(autoLanguage('异常, 错误码: ?。'),nodeInfo['Flag'])}}</span>
         </div>
         <div class="Ellipsis" table-key="NodeName">
            <a class="linkButton" ng-click="GotoNode(nodeInfo['HostName'],nodeInfo['ServiceName'])">{{nodeInfo['NodeName']}}</a>
         </div>
         <div class="Ellipsis" table-key="HostName">
            <a class="linkButton" ng-click="GotoHostInfo(nodeInfo['HostName'])">{{nodeInfo['HostName']}}</a>
         </div>
         <div class="Ellipsis" table-key="GroupName">
            <a class="linkButton" ng-click="GotoGroup(nodeInfo['GroupName'])">{{nodeInfo['GroupName']}}</a>
         </div>
         <div class="Ellipsis" table-key="IsPrimary">{{nodeInfo['IsPrimary']}}</div>
         <div class="Ellipsis" table-key="Role">{{nodeInfo['Role']}}</div>
         <div class="Ellipsis" table-key="$auto">{{$autoValue}}</div>
      </div>

   </div>
</div>